﻿using System;
using System.Globalization;
using System.Text.RegularExpressions;
using System.Xml.XPath;
using System.Xml;
using System.Net;
using System.Web;

using Twitter4Umbraco.Extensions;

namespace Twitter4Umbraco
{
    public class XsltExtensions
    {
        /// <summary>
        /// Format Twitter Date
        /// </summary>
        /// <param name="twitterDate">Thu Nov 08 19:07:37 +0000 2007</param>
        /// <returns>2007-11-08T19:07:37</returns>
        public static string FormatTwitterDate(string twitterDate)
        {
			return Common.FormatTwitterDate(twitterDate);
        }
        /// <summary>
        /// Format the tweet, with @reply links, #searches and external URLs
        /// </summary>
        /// <param name="twitterText">The original tweet</param>
        /// <returns>The new text with <a> tags added</returns>
        public static string FormatUrls(string twitterText) // TODO: Add options, to enable/disable the various links
        {
			return Common.FormatUrls(twitterText);
        }

		public static string GetPrettyDate(string date, string format)
		{
			return Common.GetPrettyDate(date, format);
		}

		public static string BakeTweek(string statusId)
		{
			return Common.BakeTweet(statusId);
		}

		public static string GetStatusUrl(string statusId, string username)
		{
			return Common.GetStatusUrl(statusId, username);
		}

		// TODO: Consider not using the Common class ... just use the XsltExtenions - or have the Common actuall be the XsltExtensions?!
    }
}